(function(){
	window.onload = function(){
		// 序号背景图
		var sort_bg = '',
			// 编辑
			editor = '';
		Vue.component('volunteer-table',{
			template:`
			<div>
				<div class="b-f" v-for='(table,index) of tables'>
					<h2 :class="arrow?'icon-arrow-down2':'icon-arrow-right2'" @click=turn(index)>{{table.batch}}</h2>
					<div class="selected" v-show=arrow>
						<div class="selected-cell pl pr">
							<ul>
					    		<li>
									<div class="selected-cell-info">
										<div class="info">
											<div class="sort"><span>{{index+1}}</span></div>
											<div class="logo">
												<div><img src="http://api.gaiwenkeji.com/Public/Logo/52ac2e99747aec013fcf4e6f.jpg" alt="logo" title="logo" width="85"></div>
												<div>
													<div>
														<span class="school-name">{{table.school_name}}</span>
														<span class="city">{{table.city}}</span>
													</div>
													<div>
														<span>{{table.allow}}</span>
														<span>2016年最低分：{{table.low_score}}</span>
													</div>
												</div>
											</div>
										</div>
										<div class="enroll">
											<span>录取率</span>
											<span>{{table.enroll}}%</span>
										</div>
									</div>
									<div class="table pl pr">
										<div class="row">
											<span class="column" v-for='(pro,eq) of table.professions'>{{eq+1}}.{{pro}}</span>
										</div>
									</div>
					    		</li>
							</ul>
						</div>
					</div>
				</div>
			</div>`,
			name: 'SingleComponent',
			data(){
				return{
					arrow: true,
					tables:[
						{
							batch: '本科第一批',
							school_name: '清华大学',
							city: '北京市',
							allow: '服从专业调剂',
							low_score: '422（A+，A）',
							enroll: 99,
							professions: ['数学类','软件工程','新闻传播类','计算机科学与技术','电子信息工程','工商管理']
						},
						{
							batch: '本科第二批',
							school_name: '北京大学',
							city: '北京市',
							allow: '不服从专业调剂',
							low_score: '419（A+，A）',
							enroll: 98,
							professions: ['语言类','软件工程','新闻传播类','计算机科学与技术']
						}
					]
				}
			},
			methods:{
				turn: function(){
					this.arrow = !this.arrow;
				},
				hover: function(){}
			}
		})
		window.app = new Vue({
			el: '.container',
			data(){
				return{
					sort_bg,
					editor
				}
			}
		})
	}
})()